import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api//packageLog/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getBackendPage = (current, size, params) => {
  return request({
    url: '/api//packageLog/pageBackend',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}


export const getFrontPage = (current, size, params) => {
  return request({
    url: '/api//packageLog/pageFront',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/packageLog/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (id) => {
  return request({
    url: '/api/packageLog/remove',
    method: 'post',
    params: {
      id,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/packageLog/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/packageLog/edit',
    method: 'post',
    data: row
  })
}
export const getBackendConfigList = (queryData) => {
  return request({
    url: '/api/packageBackendConfig/dicList',
    method: 'get',
    data:queryData
  })
}

export const getFrontConfigList = (queryData) => {
  return request({
    url: '/api/packageFrontConfig/dicList',
    method: 'get',
    data:queryData
  })
}



export const frontStartModule = (row) => {
  return request({
    url: '/api/package/manage/frontStartModule',
    method: 'get',
    params: {
      id:row.id
    }
  })
}


export const backStartModule = (row,port) => {
  return request({
    url: '/api/package/manage/backStartModule',
    method: 'get',
    params: {
      id: row.id,
      port: row.port
    }
  })
}
